home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Internet / News / Alexandra.0.82 / Source / NiceStuff.subproj / MiscURIWell.m < prev    next >
Encoding:
Text File  |  1996-02-07  |  2.6 KB  |  100 lines

  1.  
  2. #import "MiscURIWell.h"
  3. #import "MiscURICell.h"
  4.  
  5. //---------------------------------------------------------------------------------------
  6.     @implementation MiscURIWell
  7. //---------------------------------------------------------------------------------------
  8.  
  9.     /*" Quick'n'Dirty hack. "*/
  10.  
  11. //---------------------------------------------------------------------------------------
  12.     - initFrame:(NXRect *)frameRect
  13. //---------------------------------------------------------------------------------------
  14.  
  15.     {
  16.     [super initFrame:frameRect];
  17.     myCell=[[MiscURICell allocFromZone:[self zone]] init];
  18.  
  19.     return self;
  20.     }
  21.  
  22.  
  23. //-----------------------------------------------------------------------------
  24.     - drawSelf:(const NXRect *)rects :(int)rectCount;
  25. //-----------------------------------------------------------------------------
  26.  
  27.     {
  28.     [super drawSelf:rects:rectCount];
  29.     [myCell drawSelf:&bounds inView:self];
  30.  
  31.     return self;
  32.     }
  33.  
  34.  
  35. //-----------------------------------------------------------------------------
  36.     - mouseDown:(NXEvent *)theEvent;
  37. //-----------------------------------------------------------------------------
  38.  
  39.     {
  40.     [myCell trackMouse:theEvent inRect:&bounds ofView:self];
  41.     
  42.     return self;    
  43.     }
  44.  
  45.  
  46. //---------------------------------------------------------------------------------------
  47.     - awakeFromNib;
  48. //---------------------------------------------------------------------------------------
  49.  
  50.     {
  51.     [self takeURIFrom:refObject];
  52.     return self;
  53.     }
  54.     
  55.     
  56. //---------------------------------------------------------------------------------------
  57.     - setRefObject:aControl;
  58. //---------------------------------------------------------------------------------------
  59.  
  60.     {
  61.     refObject=aControl;
  62.     return self;
  63.     }
  64.  
  65.  
  66. //---------------------------------------------------------------------------------------
  67.     - refObject;
  68. //---------------------------------------------------------------------------------------
  69.  
  70.     {
  71.     return refObject;
  72.     }
  73.  
  74.  
  75. //---------------------------------------------------------------------------------------
  76.     - takeURIFrom:sender;
  77. //---------------------------------------------------------------------------------------
  78.  
  79.     {
  80.     [myCell setURI:[sender stringValue]];
  81.     return self;
  82.     }
  83.  
  84.  
  85. //---------------------------------------------------------------------------------------
  86.     - takeStringValueFrom:sender;
  87. //---------------------------------------------------------------------------------------
  88.  
  89. /*" Same as #{takeStringValueFrom:}. "*/
  90.  
  91.     {
  92.     return [self takeURIFrom:sender];
  93.     }
  94.  
  95.  
  96. //---------------------------------------------------------------------------------------
  97.     @end
  98. //---------------------------------------------------------------------------------------
  99.  
  100.